package com.blacktech.dbu.meta.entity;

import com.blacktech.dbu.core.common.BaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.persistence.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 数据字典项信息
 *
 * @author yanyunsong
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "dbu_dictionary_item")
public class DbuDictionaryItem extends BaseEntity {
    /**
     * 字典项代码
     */
    @Column(name = "item_code")
    private String itemCode;

    /**
     * 字典项名称
     */
    @Column(name = "item_name")
    private String itemName;

    /**
     * 显示顺序
     */
    @Column(name = "display_order")
    private Integer displayOrder;

    /**
     * 关联的数据字典
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "dict_id")
    @JsonIgnore
    private DbuDictionary dictionary;
}